package 强化训练;

import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Scanner;

public class day22第一次出现一次的字符串 {
    static LinkedHashMap<Character,Integer> linkedHashMap = new LinkedHashMap<>();
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String str = sc.next();
        for (char c : str.toCharArray()) {
            linkedHashMap.put(c,linkedHashMap.getOrDefault(c,0) + 1);
        }
        for (Map.Entry<Character,Integer> map : linkedHashMap.entrySet()){
            if (map.getValue() == 1){
                System.out.println(map.getKey());
                break;
            }
        }
        System.out.println(-1);
    }
}
